import http from '@/utils/request.js'    

/***** 后台分类(Category) 模块 *******/

// 一级分类列表数据(数据量不多，就不作分页处理了)
export function  getCategoryList() {
	return http.request({
		url: "/category/list",
		method: "get",		
	});
}

//删除分类ById
export function  deleteCategoryById(id) {
	return http.request({
		url: "/category/delete",
		method: "get",
		params: {id},
	});
}
//更新/增加分类 （id有则更新，无则增加）
export function  updateCategory(params) {
	return http.request({
		url: "/category/update",
		method: "post",
		data: params,
	});
}

//查询分类详情ById
export function  getCategoryDetailById(id) {
	return http.request({
		url: "/category/detail",
		method: "get",
		params: {id},
	});
}

